export default {
  // 开启命名空间
  namespaced: true,

  // 数据
  state: () => ({
    // 用户的信息对象
    dept: JSON.parse(uni.getStorageSync('dept') || '{}'),
	deptId: JSON.parse(uni.getStorageSync('deptId') || '{}'),
  }),

  // 方法
  mutations: {
    updateDeptInfo(state, dept) {
      state.dept = dept
	  state.deptId = dept.deptId
      this.commit('m_dept/saveDeptInfoToStorage')
    },
    saveDeptInfoToStorage(state) {
      uni.setStorageSync('dept', JSON.stringify(state.dept))
	  uni.setStorageSync('deptId', state.deptId)
    },
   
   
  },

  getters: {
   
  }
}
